home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sports Illustrated Swims… Screen Saver (Alternate)
/
Sports Illustrated Swimsuit Calendar & Screen Saver.iso
/
win31
/
setupcc.mst
< prev
next >
Wrap
Text File
|
1995-09-19
|
62KB
|
1,703 lines
'' some merge codes -- can add these up
'' 1 merge
'' 2 delete albums
'' 4 delete pasetup.ini
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
'' '$DEFINE DEBUG 1
'' dialog IDs
CONST WELCOME=100
CONST ASKQUITD=200
CONST LEGAL=250
CONST PROG_PATH=300
CONST ART_PATH=350
CONST FILTERS_PATH=375
CONST GETARTPATH=386
CONST GETELPATH=387
CONST GETWSPATH=388
CONST DATAPATH=390
CONST NET_FILTERS_PATH=395
CONST NET_ART_PATH=397
CONST EXITFAILURE=400
CONST EXITQUIT=600
CONST EXITSUCCESS=700
CONST ART_DLG=850
CONST CUSTINST=6200
CONST TOOBIG=6300
CONST TOOBIG2=6350
CONST BADPATH=6400
CONST PREV_INST=6500
CONST NEW_INST=6501
CONST NEW_PATH=6502
CONST INI_ENTRIES=6505
CONST WARN_BOTH=6506
CONST WARN_PRES=6507
CONST WARN_HOL=6508
CONST WARN_WIN30=6509
CONST WARN_OTHER_FM=6510
CONST GETINFO=7500
CONST NODESETUP=7600
CONST NETWORK_INFO=7700
'' art category checkbox elements
CONST STATUS=1
CONST SECTION=3
CONST ITEMCOST=5
CONST ALBUM=6
CONST ALBUM_SECTION=7
CONST ALBUM_COST=8
CONST DEFAULT_STATUS=9
const IDYES=6
const MB_YESNO=4
const MB_ICONQUESTION=32
CONST OPT_CLIP_ART=4
'' setup mode
CONST ADMIN=1
CONST NORMAL=2
CONST NODE=3
CONST NETWORK=4
'' script vars
GLOBAL NEWPATH$
GLOBAL DEST$
GLOBAL DEST_ART$
GLOBAL DEST_FILTERS$
GLOBAL WINDRIVE$
GLOBAL PROGDRIVE$
GLOBAL ARTDRIVE$
GLOBAL FILTERSDRIVE$
GLOBAL WORKING_DEST$
GLOBAL EXE_PATH$
GLOBAL NAME_STR$
GLOBAL ORG_STR$
GLOBAL DATA_PATH$
GLOBAL PROG_COST$
GLOBAL FILTERS_COST$
GLOBAL SEL_COST$
GLOBAL IEL_COST$
GLOBAL WRKSPC_COST$
GLOBAL ART_COST$
GLOBAL ART_HOL_REL_COST$
GLOBAL ART_BUS_GOV_COST$
GLOBAL ART_HOL_GOV_COST$
GLOBAL ART_PER_HOL_COST$
GLOBAL nWinDrive%
GLOBAL WinVer30
GLOBAL CUIDLL$
GLOBAL STR_REQ$
GLOBAL STR_AVAIL$
GLOBAL DIALOG_LIST$
GLOBAL CURRENT_DLG$
GLOBAL CHK_PROG_FILES$
GLOBAL CHK_STD_EVNT_LST$
GLOBAL CHK_INTL_EVNT_LST$
GLOBAL CHK_WORK_SPCS$
GLOBAL CHK_CLIP_ART$
GLOBAL CHK_AUTO_LAUNCH$
GLOBAL RAD_ALBUM_ONLY$ '' dfg
GLOBAL RAD_BUILD_ALBUM$
GLOBAL RAD_ART_ONLY$
GLOBAL STR_PROG_PATH$
GLOBAL STR_CLIP_ART_PATH$
GLOBAL STR_FILTERS_PATH$
GLOBAL STR_REQ_PROG$
GLOBAL STR_REQ_CLIP_ART$
GLOBAL STR_REQ_FILTERS$
GLOBAL STR_AVAIL_PROG$
GLOBAL STR_AVAIL_ART$
GLOBAL STR_AVAIL_FILTERS$
GLOBAL STR_REQ_PROG2$
GLOBAL STR_REQ_SEL$
GLOBAL STR_REQ_IEL$
GLOBAL STR_REQ_WK_SPC$
GLOBAL STR_REQ_CLIP_ART2$
GLOBAL DIA%
GLOBAL _SEL$
GLOBAL DIA_IEL$
GLOBAL DIA_WRKSPC$
GLOBAL DIA_ART$
GLOBAL STR_REQ_ART_DLG$
GLOBAL STR_AVAIL_ART_DLG$
GLOBAL STR_REQ_GEN$
GLOBAL STR_AVAIL_GEN$
GLOBAL EXTRACOSTS$
GLOBAL COSTLIST$
GLOBAL NEEDLIST$
GLOBAL BIGLIST$
GLOBAL ini$
GLOBAL NetworkInf$
GLOBAL TotalSpcFree&
GLOBAL OldCursor%
GLOBAL FrameWindow%
GLOBAL OptionsChecked%
GLOBAL RootDir$
GLOBAL WinDir$
GLOBAL WinSysDir$
GLOBAL sourcDir$
GLOBAL srcDirChanged%
GLOBAL fileCostChecked%
GLOBAL mode%
GLOBAL idDlg%
GLOBAL setupInfInMem%
GLOBAL NEED_MERGE%
GLOBAL CD_ART_PATH$
GLOBAL TTF_PATH$
GLOBAL artSrcPath$
GLOBAL _ON$
GLOBAL _NO$
GLOBAL _YES$
GLOBAL _CCW$
GLOBAL _CCPO$
GLOBAL _CPS$
GLOBAL _GRAPH_INI$
GLOBAL _FILTER_VER$
GLOBAL _BLANK_ALB$
GLOBAL _THEME_ALB$
GLOBAL _BIG_ALB$
GLOBAL _INSTALL_PATH$
GLOBAL _EXE_NAME$
GLOBAL _PASETUP_INI$
'' tokens for localizable strings
GLOBAL _SETUP_TITLE$
GLOBAL _KB_STR$
GLOBAL _ZERO_KB_STR$
GLOBAL _ERRMSG_FATAL$
GLOBAL _ERRMSG_NOFIND$
GLOBAL _ERRMSG_CONTACT$
GLOBAL _ERRMSG_OPTCALC$
GLOBAL _PROG_GRP$
GLOBAL _ICON_CCW$
GLOBAL _ICON_PA$
GLOBAL _ICON_README$
GLOBAL _ICON_NETREADME$
Declare Function WinExec Lib "Kernel" (szCmdLine$, show%) As Integer
DECLARE FUNCTION MakeKbString LIB "mscuistf.dll" (szStr$) AS INTEGER
DECLARE SUB HelpQuit LIB "mscuistf.dll" (hwnd%)
DECLARE SUB DeleteOldIcons LIB "mscuistf.dll"
DECLARE SUB Use3d LIB "mscuistf.dll"
DECLARE SUB UnUse3d LIB "mscuistf.dll"
DECLARE FUNCTION DoAlbumMerge LIB "mscuistf.dll" (szOldArtPath$, szNewArtPath$, szAlbumName$) AS INTEGER
DECLARE FUNCTION InstallTTF LIB "mscuistf.dll" (szTTF$, szDest$) AS INTEGER
DECLARE FUNCTION MakeKb (szStr$) AS STRING
DECLARE FUNCTION GetCostValue (ftype%) AS LONG
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION GetTotalSpcFree AS LONG
DECLARE SUB DoFontStuff
DECLARE SUB BuildCopyList
DECLARE SUB GetFileCosts
DECLARE SUB SetDriveStatus
DECLARE SUB AddArtToCopyList
DECLARE SUB OpenWaitMessage (Msg%)
DECLARE SUB CloseWaitMessage
DECLARE SUB CheckWin30
DECLARE SUB DoIniStuff
DECLARE SUB AskQuit
DECLARE SUB LegalBullshit
DECLARE SUB DoIconStuff
DECLARE SUB GetUserInfo
DECLARE SUB SetupIniForMerge
DECLARE SUB RunNextInstall
'' following routines are in file 'init.inc'
DECLARE SUB InitDefaultPaths
DECLARE SUB InitMainDialogSymbols
DECLARE SUB InitArtDialogSymbols
DECLARE SUB ReInitArtDialogSymbols
DECLARE FUNCTION GetAlbumName AS STRING
DECLARE FUNCTION GetDriveName(szPath$) AS STRING
'' ** script execution begins here **
INIT:
_ON$ = "ON"
_NO$ = "NO"
_YES$ = "YES"
'' section names in powerup.ini:
_CCW$ = "Sports Illustrated Swimsuit Calendar"
_CCPO$ = "Sports Illustrated Swimsuit Calendar Print Options"
_CPS$ = "Calendar Paper Stocks"
_GRAPH_INI$ = "GRAPHICS FILTERS"
_BLANK_ALB$ = "blank.alb"
_THEME_ALB$ = "siswim2.alb"
_BIG_ALB$ = "SISWM2CD.alb"
_INSTALL_PATH$ = "SISWIM2"
_EXE_NAME$ = "SISWIM2.EXE"
_PASETUP_INI$ = "PASETUP.INI"
CUIDLL$ = "mscuistf.dll"
CURRENT_DLG$ = "CurrentDlg"
COSTLIST$ = "CostList"
NEEDLIST$ = "NeedList"
BIGLIST$ = "TooBig"
EXTRACOSTS$ = "ExtraCosts"
ORG_STR$ = "OrgOut"
NAME_STR$ = "NameOut"
'' TRANSLATOR START
'' title caption for main setup window
_SETUP_TITLE$ = "The Sports Illustrated Swimsuit Calendar and Screen Saver 2.0 Setup"
_KB_STR$ = " Kb" '' kilobytes disk space
_ZERO_KB_STR$ = "0 Kb"
'' setup error msgs
_ERRMSG_FATAL$ = "Unexpected Setup error; installation disk may be faulty."
_ERRMSG_NOFIND$ = "Setup cannot find " '' <filename>
_ERRMSG_CONTACT$ = ". Contact your network administrator."
_ERRMSG_OPTCALC$ = "Error in calculating option: "
'' captions for program group & program icons
_PROG_GRP$ = "SI Swimsuit Calendar"
_ICON_CCW$ = "SI Swimsuit Calendar"
_ICON_PA$ = "PowerAlbum"
_ICON_README$ = "Read Me"
_ICON_NETREADME$ = "Read Me for Network Admin"
'' TRANSLATOR END
CursorSave% = ShowWaitCursor ()
srcDirChanged% = 0
sourcDir$ = GetSymbolValue ("STF_SRCDIR")
artSrcPath$ = MID$(sourcDir$, 1, 1)
artSrcPath$ = artSrcPath$ + ":\ART\"
WinDir$ = MakePath (MID$ (GetWindowsDir (), 1, LEN(GetWindowsDir ()) - 1), "")
WinSysDir$ = MakePath (MID$ (GetWindowsSysDir (), 1, LEN(GetWindowsSysDir ()) - 1), "")
RootDir$ = GetDriveName ( WinDir$ )
FrameWindow% = HwndFrame ()
SetSymbolValue "FrameWindow", STR$ (FrameWindow%)
fileCostChecked% = 0
RestoreCursor CursorSave%
'' SetAbout is no good: it *adds* the specified strings to existing text
'' in msshlstf.dll; must edit the stringtable resource in msshlstf.dll
''SetAbout "", ""
SetTitle _SETUP_TITLE$
SetBitmap CUIDLL$, 1
GOSUB GET_SETUP_MODE
SetBitmap CUIDLL$, 1
if mode% = NODE then
goto DO_NODE_SETUP
endif
CursorSave% = ShowWaitCursor ()
'' 26 drives ( A-Z )
FOR i% = 1 TO 26 STEP 1
AddListItem BIGLIST$, ""
NEXT i%
FOR i% = 1 TO 26 STEP 1
AddListItem EXTRACOSTS$, "0"
NEXT i%
'' INF path always null unless provided on setup cmdline
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = MakePath( GetSymbolValue("STF_CWDDIR"), "SETUPCC.INF" )
ENDIF
setupInfInMem% = 0
ReadInfFile szInf$
setupInfInMem% = 1
WinVer30 = 0
if (GetWindowsMajorVersion () = 3) and (GetWindowsMinorVersion () = 0) then
WinVer30 = 1
endif
RestoreCursor CursorSave%
InitDefaultPaths
InitMainDialogSymbols
InitArtDialogSymbols
LegalBullshit
RE_INIT:
CursorSave% = ShowWaitCursor ()
InitDefaultPaths
InitMainDialogSymbols
ReInitArtDialogSymbols
RestoreCursor CursorSave%
if mode% = ADMIN or mode% = NETWORK then
goto REFRESH_CUSTOM
endif
WELCOME:
if srcDirChanged% = 1 then
SetSymbolValue "STF_SRCDIR", sourcDir$
srcDirChanged% = 0
endif
if setupInfInMem% = 0 then
ReadInfFile szInf$
setupInfInMem% = 1
endif
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FWelcomeDlgProc", 0, "")
IF sz$ = "COMPLETE" THEN
UIPop 1
BuildCopyList
IF GetListItem (BIGLIST$, 1) = _YES$ THEN
GOSUB TOOBIG
GOTO REFRESH_CUSTOM
ENDIF
GOTO INSTALL
ELSEIF sz$ = "CUSTOM" THEN
UIPop 1
GOTO REFRESH_CUSTOM
ELSEIF sz$ = "REACTIVATE" THEN
GOTO WELCOME
ELSE
AskQuit
GOTO WELCOME
END IF
'' refresh custom install dialog
REFRESH_CUSTOM:
if mode% <> NETWORK then
GetFileCosts
endif
SetDriveStatus
CUSTINST:
sz$ = UIStartDlg(CUIDLL$, CUSTINST, "FCustInstDlgProc", 0, "")
IF sz$ = "INSTALL" THEN
BuildCopyList
''install only if it will fit
IF GetListItem (BIGLIST$, 1) = _YES$ THEN
GOSUB TOOBIG
GOTO CUSTINST
ENDIF
UIPop 1
GOTO INSTALL
ELSEIF sz$ = "BTN_PROG_PATH" THEN
GOTO GETPATH
ELSEIF sz$ = "BTN_ART_PATH" THEN
GOTO GETPATH_ART
ELSEIF sz$ = "BTN_FILTERS_PATH" THEN
GOTO GETPATH_FILTERS
ELSEIF sz$ = "UPDATE" THEN
SetDriveStatus
GOTO CUSTINST
ELSEIF sz$ = "BTN_BACK" then
UIPop 1
goto RE_INIT
ELSEIF sz$ = "BTN_ART_OPTIONS" THEN
GOTO ART_OPTIONS
ELSEIF sz$ = "REINIT" THEN
GOTO CUSTINST
ELSEIF sz$ = "REACTIVATE" THEN
SetDriveStatus
GOTO CUSTINST
ELSE
AskQuit
GOTO CUSTINST
END IF
GETPATH:
WORKING_DEST$ = DEST$
iType% = PROG_PATH
GOTO HANDLE_GETPATH
GETPATH_ART:
WORKING_DEST$ = DEST_ART$
iType% = ART_PATH
GOTO HANDLE_GETPATH
GETPATH_FILTERS:
WORKING_DEST$ = DEST_FILTERS$
iType% = FILTERS_PATH
HANDLE_GETPATH:
SetSymbolValue "EditTextIn", WORKING_DEST$
SetSymbolValue "EditFocus", "END"
sz$ = UIStartDlg (CUIDLL$, iType%, "FEditDlgProc", 0, "")
IF sz$ = "OK" THEN
olddest$ = WORKING_DEST$
WORKING_DEST$ = MakePath (LCASE$ (GetSymbolValue("EditTextOut")), "")
''validate new path
IF (IsDirWritable (WORKING_DEST$) = 0) OR (INSTR(1, WORKING_DEST$, ".") <> 0) THEN
GOSUB BADPATH
WORKING_DEST$ = olddest$
GOTO HANDLE_GETPATH
END IF
UIPop 1
IF iType% = PROG_PATH THEN
DEST$ = LCASE$(WORKING_DEST$)
SetSymbolValue EXE_PATH$, DEST$
SetSymbolValue STR_PROG_PATH$, DEST$
PROGDRIVE$ = MID$ (DEST$, 1, 1)
ELSEIF iType% = ART_PATH THEN
DEST_ART$ = LCASE$( WORKING_DEST$ )
SetSymbolValue STR_CLIP_ART_PATH$, DEST_ART$
ARTDRIVE$ = MID$ (DEST_ART$, 1, 1)
ELSEIF iType% = FILTERS_PATH THEN
DEST_FILTERS$ = LCASE$( WORKING_DEST$ )
SetSymbolValue STR_FILTERS_PATH$, DEST_FILTERS$
FILTERSDRIVE$ = MID$ (DEST_FILTERS$, 1, 1)
ENDIF
'' recalc if path changed
IF (olddest$ <> WORKING_DEST$) AND (olddest$ <> WORKING_DEST$+"\") AND (olddest$+"\" <> WORKING_DEST$) THEN
SetDriveStatus
END IF
olddest$ = ""
GOTO CUSTINST
ELSEIF sz$ = "REACTIVATE" THEN
SetDriveStatus
GOTO HANDLE_GETPATH
ELSEIF sz$ = "EXIT" THEN
AskQuit
GOTO HANDLE_GETPATH
ELSE
UIPop 1
olddest$ = ""
GOTO CUSTINST
END IF
ART_OPTIONS:
SetSymbolValue STR_REQ_GEN$, STR_REQ_ART_DLG$
SetSymbolValue STR_AVAIL_GEN$, STR_AVAIL_ART_DLG$
SetSymbolValue CURRENT_DLG$, DIA_ART$
iDialog% = ART_DLG
HANDLE_DLG:
sz$ = UIStartDlg(CUIDLL$, iDialog%, "FOptionsDlgProc", 0, "")
IF sz$ = "OK" THEN
UIPop 1
GOTO REFRESH_CUSTOM
ELSEIF sz$ = "CANCEL" THEN
UIPop 1
GOTO REFRESH_CUSTOM
ELSEIF sz$ = "REACTIVATE" THEN
GOTO HANDLE_DLG
ELSEIF sz$ = "GLOBAL_SELECT" OR sz$ = "CHECKBOX_EVENT" THEN
SetDriveStatus
if iDialog% = ART_DLG then
goto ART_OPTIONS
endif
ELSE
AskQuit
GOTO HANDLE_DLG
END IF
TOOBIG:
sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfo1DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
SetDriveStatus
GOTO TOOBIG
END IF
UIPop 1
RETURN
TOOBIG2:
sz$ = UIStartDlg(CUIDLL$, TOOBIG2, "FInfo1DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO TOOBIG2
END IF
UIPop 1
RETURN
BADPATH:
sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO BADPATH
END IF
UIPop 1
RETURN
INSTALL:
'' create the necessary directories
''IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
'' CreateDir DEST$, cmoNone
'' CreateDir DEST_FILTERS$, cmoNone
''ENDIF
''IF GetSymbolValue (CHK_CLIP_ART$) = _ON$ THEN
'' CreateDir DEST_ART$, cmoNone
''ENDIF
UnUse3d
CopyFilesInCopyList
Use3d
if mode% <> NODE then
if IsDirWritable( WinDir$ ) = 1 then
szDestFile$ = MakePath( WinDir$, "ccstyles.ccy" )
if DoesFileExist( szDestFile$, femExists) <= 0 then
CopyFile MakePath(DEST$,"ccstyles.ccy"),szDestFile$,cmoNone,0
endif
endif
endif
'' PMGRPAPI.DLL DDE conflicts with MSSETUP'S. Make sure that
'' PMGRPAPI.DLL begins a conversation before or after MSSETUP's
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
CursorSave% = ShowWaitCursor ()
DeleteOldIcons '' call PMGRPAPI.DLL to delete PA 1.02 icon
DoFontStuff
RestoreCursor CursorSave%
ENDIF
DoIniStuff
DoIconStuff
'' warn 3.0 users they need font manager
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
CheckWin30
ENDIF
GetUserInfo
szDelFile$ = MakePath( GetSymbolValue("STF_CWDDIR"), "chklist.ms" )
RemoveFile szDelFile$, cmoNone
SetupIniForMerge
QUIT:
ON ERROR GOTO ERRQUIT
IF ERR = 0 THEN
dlg% = EXITSUCCESS
ELSEIF ERR = STFQUIT THEN
dlg% = EXITQUIT
ELSE
dlg% = EXITFAILURE
END IF
if dlg% <> EXITSUCCESS then
GOTO EXIT_FAIL
endif
nextInstall% = 0
ASKLOOP2:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FQuitDlgProc", 0, "")
IF sz$ = "OK" THEN
nextInstall% = 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ASKLOOP2
ELSE
ENDIF
UIPopAll
if nextInstall = 1 then
RunNextInstall
endif
HelpQuit (FrameWindow%)
END
EXIT_FAIL:
QUITL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO QUITL1
END IF
UIPop 1
HelpQuit (FrameWindow%)
END
ERRQUIT:
i% = DoMsgBox(_ERRMSG_FATAL$, _SETUP_TITLE$, MB_OK+B_TASKMODAL+MB_ICONHAND)
HelpQuit (FrameWindow%)
szDelFile$ = MakePath( GetSymbolValue("STF_CWDDIR"), "chklist.ms" )
RemoveFile szDelFile$, cmoNone
END
'' AskQuit
''
SUB AskQuit STATIC
ASKLOOP:
sz$ = UIStartDlg(CUIDLL$, ASKQUITD, "FQuitDlgProc", 0, "")
IF sz$ = "OK" THEN
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ASKLOOP
ELSE
UIPopAll
HelpQuit (FrameWindow%)
szDelFile$ = MakePath( GetSymbolValue("STF_CWDDIR"), "chklist.ms" )
RemoveFile szDelFile$, cmoNone
END
END IF
END SUB
SUB LegalBullshit STATIC
ASKLOOP:
sz$ = UIStartDlg(CUIDLL$, LEGAL, "FLegalDlgProc", 0, "")
IF sz$ = "OK" THEN
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ASKLOOP
ELSE
UIPopAll
HelpQuit (FrameWindow%)
szDelFile$ = MakePath( GetSymbolValue("STF_CWDDIR"), "chklist.ms" )
RemoveFile szDelFile$, cmoNone
END
END IF
END SUB
'' BuildCopyList
''
SUB BuildCopyList STATIC
CursorSave% = ShowWaitCursor()
ClearCopyList
SrcDir$ = GetSymbolValue("STF_SRCDIR")
PROGDRIVE$ = MID$ (DEST$, 1, 1)
ARTDRIVE$ = MID$ (DEST_ART$, 1, 1)
FILTERSDRIVE$ = MID$ (DEST_FILTERS$, 1, 1)
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
AddSectionFilesToCopyList "PowerAlbum Files", SrcDir$, DEST$
AddSectionFilesToCopyList "PowerAlbum Files FILTERS", SrcDir$, DEST_FILTERS$
AddSectionFilesToCopyList "Program Files", SrcDir$, DEST$
AddSectionFilesToCopyList "Readme Files", SrcDir$, DEST$
if mode% = ADMIN then
AddSectionFilesToCopyList "Setup Files", SrcDir$, DEST$
AddSectionFilesToCopyList "Font Files", SrcDir$, DEST$
'' AddSectionFilesToCopyList "ccstyle", SrcDir$, DEST$
endif
ENDIF
''deal with the fonts
IF (mode% = NORMAL) and GetSymbolValue(CHK_PROG_FILES$) = _ON$ then
if IsDirWritable(WinSysDir$) = 1 then
AddSectionFilesToCopyList "Font Files", SrcDir$, WinSysDir$
TTF_PATH$ = WinSysDir$
elseif IsDirWritable(WinDir$) = 1 then
AddSectionFilesToCopyList "Font Files", SrcDir$, WinDir$
TTF_PATH$ = WinDir$
else
AddSectionFilesToCopyList "Font Files", SrcDir$, DEST$
TTF_PATH$ = DEST$
endif
ENDIF
IF GetSymbolValue (CHK_STD_EVNT_LST$) = _ON$ THEN
AddSectionFilesToCopyList "sel", SrcDir$, DEST$
ENDIF
IF GetSymbolValue (CHK_INTL_EVNT_LST$) = _ON$ THEN
AddSectionFilesToCopyList "iel", SrcDir$, DEST$
ENDIF
IF GetSymbolValue (CHK_WORK_SPCS$) = _ON$ THEN
AddSectionFilesToCopyList "Calendar Files", SrcDir$, DEST$
ENDIF
ArtOptionsChecked% = 0
IF GetSymbolValue(CHK_CLIP_ART$) = _ON$ THEN
AddArtToCopyList
ENDIF
IF GetSymbolValue(RAD_BUILD_ALBUM) = _ON$ or GetSymbolValue(RAD_ART_ONLY) = _ON$ THEN
AddSectionFilesToCopyList "blankalb", SrcDir$, DEST_ART$
ENDIF
'' calculate the disk costs
StillNeed& = GetCopyListCost (EXTRACOSTS$, COSTLIST$, NEEDLIST$)
RestoreCursor CursorSave%
SetSymbolValue "DRIVE_ERROR", "@"
IF StillNeed& > 0 THEN
ReplaceListItem BIGLIST$, 1, _YES$
FOR i% = 1 to 26 STEP 1
if VAL (GetListItem (NEEDLIST$, i%)) > 0 then
SetSymbolValue "DRIVE_ERROR", CHR$ (ASC("A") - 1 + i%) + ":"
goto ESCAPE
endif
NEXT i%
ESCAPE:
ELSE
ReplaceListItem BIGLIST$, 1, _NO$
ENDIF
END SUB
'' SetDriveStatus
''
SUB SetDriveStatus STATIC
CursorSave% = ShowWaitCursor()
'' convert drive letters to integers
PDrv% = ASC(ucase$(PROGDRIVE$)) - ASC("A") + 1
ADrv% = ASC(ucase$(ARTDRIVE$)) - ASC("A") + 1
FDrv% = ASC(ucase$(FILTERSDRIVE$)) - ASC("A") + 1
'' when all the drives are the same, hide the
'' ART and FILTERS status string windows
IF (PDrv% = ADrv%) AND (PDrv% = FDrv%) THEN
SetSymbolValue STR_REQ_CLIP_ART$, ""
SetSymbolValue STR_REQ_FILTERS$, ""
SetSymbolValue STR_AVAIL_ART$, ""
SetSymbolValue STR_AVAIL_FILTERS$,""
'' update the Program Space Required string
cost& = 0
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
cost& = cost& + VAL (PROG_COST$) + VAL (FILTERS_COST$)
ENDIF
IF GetSymbolValue (CHK_STD_EVNT_LST$) = _ON$ THEN
cost& = cost& + VAL( SEL_COST$ )
ENDIF
IF GetSymbolValue (CHK_INTL_EVNT_LST$) = _ON$ THEN
cost& = cost& + VAL( IEL_COST$ )
ENDIF
IF GetSymbolValue (CHK_WORK_SPCS$) = _ON$ THEN
cost& = cost& + VAL( WRKSPC_COST$ )
ENDIF
IF GetSymbolValue (CHK_CLIP_ART$) = _ON$ THEN
cost& = cost& + GetCostValue (OPT_CLIP_ART)
ENDIF
szTemp$ = PROGDRIVE$ + ": " + MakeKb (STR$ (cost&)) + _KB_STR$
SetSymbolValue STR_REQ_PROG$, szTemp$
SetSymbolValue STR_REQ_ART_DLG$, szTemp$
'' update the Space Available (program) string
free& = GetFreeSpaceForDrive (PROGDRIVE$)
szTemp$ = PROGDRIVE$ + ": " + MakeKb (STR$ (free&)) + _KB_STR$
SetSymbolValue STR_AVAIL_PROG$, szTemp$
SetSymbolValue STR_AVAIL_ART_DLG$, szTemp$
ELSEIF ((PDrv% = ADrv%) AND (ADrv% <> FDrv%)) THEN
'' hide the ART status info
'' space REQUIRED
ProgCost& = 0
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
ProgCost& = ProgCost& + VAL (PROG_COST$)
ENDIF
IF GetSymbolValue (CHK_STD_EVNT_LST$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( SEL_COST$ )
ENDIF
IF GetSymbolValue (CHK_INTL_EVNT_LST$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( IEL_COST$ )
ENDIF
IF GetSymbolValue (CHK_WORK_SPCS$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( WRKSPC_COST$ )
ENDIF
IF GetSymbolValue (CHK_CLIP_ART$) = _ON$ THEN
ProgCost& = ProgCost& + GetCostValue (OPT_CLIP_ART)
ENDIF
szTemp$ = PROGDRIVE$ + ": " + MakeKb (STR$ (ProgCost&)) + _KB_STR$
SetSymbolValue STR_REQ_PROG$, szTemp$
SetSymbolValue STR_REQ_ART_DLG$, szTemp$
FiltersCost& = 0
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
FiltersCost& = VAL (FILTERS_COST$)
ENDIF
SetSymbolValue STR_REQ_CLIP_ART$, ""
SetSymbolValue STR_REQ_FILTERS$, FILTERSDRIVE$ + ": " + MakeKb (STR$ (FiltersCost&)) + _KB_STR$
'' space FREE
ProgFree& = GetFreeSpaceForDrive (PROGDRIVE$)
szTemp$ = PROGDRIVE$ + ": " + MakeKb (STR$ (ProgFree&)) + _KB_STR$
SetSymbolValue STR_AVAIL_PROG$, szTemp$
SetSymbolValue STR_AVAIL_ART_DLG$, szTemp$
SetSymbolValue STR_AVAIL_ART$, ""
FiltersFree& = GetFreeSpaceForDrive (FILTERSDRIVE$)
SetSymbolValue STR_AVAIL_FILTERS$, FILTERSDRIVE$ + ": " + MakeKb (STR$ (FiltersFree&)) + _KB_STR$
ELSEIF ((PDrv% <> ADrv%) AND (ADrv% = FDrv%)) OR ((PDrv% <> FDrv%) AND (ADrv% = FDrv%)) OR ((PDrv% = FDrv%) AND (ADrv% <> FDrv%)) THEN
'' hide the FILTERS status info
'' space REQUIRED
ProgCost& = 0
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
ProgCost& = ProgCost& + VAL (PROG_COST$) + VAL (FILTERS_COST$)
ENDIF
IF GetSymbolValue (CHK_STD_EVNT_LST$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( SEL_COST$ )
ENDIF
IF GetSymbolValue (CHK_INTL_EVNT_LST$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( IEL_COST$ )
ENDIF
IF GetSymbolValue (CHK_WORK_SPCS$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( WRKSPC_COST$ )
ENDIF
szTemp$ = PROGDRIVE$ + ": " + MakeKb (STR$ (ProgCost&)) + _KB_STR$
SetSymbolValue STR_REQ_PROG$, szTemp$
ArtCost& = 0
IF GetSymbolValue (CHK_CLIP_ART$) = _ON$ THEN
ArtCost& = ArtCost& + GetCostValue (OPT_CLIP_ART)
ENDIF
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
ArtCost& = ArtCost& + VAL (FILTERS_COST$)
ENDIF
szTemp$ = ARTDRIVE$ + ": " + MakeKb (STR$ (ArtCost&)) + _KB_STR$
SetSymbolValue STR_REQ_CLIP_ART$, szTemp$
SetSymbolValue STR_REQ_ART_DLG$, szTemp$
SetSymbolValue STR_REQ_FILTERS$, ""
'' space FREE
ProgFree& = GetFreeSpaceForDrive (PROGDRIVE$)
szTemp$ = PROGDRIVE$ + ": " + MakeKb (STR$ (ProgFree&)) + _KB_STR$
SetSymbolValue STR_AVAIL_PROG$, szTemp$
ArtFree& = GetFreeSpaceForDrive(ARTDRIVE$)
szTemp$ = ARTDRIVE$ + ": " + MakeKb (STR$ (ArtFree&)) + _KB_STR$
SetSymbolValue STR_AVAIL_ART$, szTemp$
SetSymbolValue STR_AVAIL_ART_DLG$, szTemp$
SetSymbolValue STR_AVAIL_FILTERS$, ""
ELSEIF (PDrv% <> FDrv%) AND (PDrv% <> ADrv%) THEN
'' show EVERYTHING
'' space REQUIRED
ProgCost& = 0
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
ProgCost& = ProgCost& + VAL (PROG_COST$)
ENDIF
IF GetSymbolValue (CHK_STD_EVNT_LST$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( SEL_COST$ )
ENDIF
IF GetSymbolValue (CHK_INTL_EVNT_LST$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( IEL_COST$ )
ENDIF
IF GetSymbolValue (CHK_WORK_SPCS$) = _ON$ THEN
ProgCost& = ProgCost& + VAL( WRKSPC_COST$ )
ENDIF
szTemp$ = PROGDRIVE$ + ": " + MakeKb (STR$ (ProgCost&)) + _KB_STR$
SetSymbolValue STR_REQ_PROG$, szTemp$
ArtCost& = 0
IF GetSymbolValue (CHK_CLIP_ART$) = _ON$ THEN
ArtCost& = ArtCost& + GetCostValue (OPT_CLIP_ART)
ENDIF
szTemp$ = ARTDRIVE$ + ": " + MakeKb (STR$ (ArtCost&)) + _KB_STR$
SetSymbolValue STR_REQ_CLIP_ART$, szTemp$
SetSymbolValue STR_REQ_ART_DLG$, szTemp$
FiltersCost& = 0
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
FiltersCost& = FiltersCost& + VAL (FILTERS_COST$)
ENDIF
SetSymbolValue STR_REQ_FILTERS$, FILTERSDRIVE$ + ": " + MakeKb (STR$ (FiltersCost&)) + _KB_STR$
'' space FREE
ProgFree& = GetFreeSpaceForDrive(PROGDRIVE$)
szTemp$ = PROGDRIVE$ + ": " + MakeKb (STR$ (ProgFree&)) + _KB_STR$
SetSymbolValue STR_AVAIL_PROG$, szTemp$
ArtFree& = GetFreeSpaceForDrive (ARTDRIVE$)
szTemp$ = ARTDRIVE$ + ": " + MakeKb (STR$ (ArtFree&)) + _KB_STR$
SetSymbolValue STR_AVAIL_ART$, szTemp$
SetSymbolValue STR_AVAIL_ART_DLG$, szTemp$
FiltersFree& = GetFreeSpaceForDrive (FILTERSDRIVE$)
SetSymbolValue STR_AVAIL_FILTERS$, FILTERSDRIVE$ + ": " + MakeKb (STR$ (FiltersFree&)) + _KB_STR$
END IF
'' other status strings
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
SetSymbolValue STR_REQ_PROG2$, MakeKb (STR$ ( (VAL(PROG_COST$) + VAL(FILTERS_COST$)))) + _KB_STR$
ELSE
SetSymbolValue STR_REQ_PROG2$, _ZERO_KB_STR$
ENDIF
IF GetSymbolValue (CHK_STD_EVNT_LST$) = _ON$ THEN
SetSymbolValue STR_REQ_SEL$, MakeKb( STR$(VAL(SEL_COST$ ))) + _KB_STR$
ELSE
SetSymbolValue STR_REQ_SEL$, _ZERO_KB_STR$
ENDIF
IF GetSymbolValue (CHK_INTL_EVNT_LST$) = _ON$ THEN
SetSymbolValue STR_REQ_IEL$, MakeKb( STR$(VAL(IEL_COST$ ))) + _KB_STR$
ELSE
SetSymbolValue STR_REQ_IEL$, _ZERO_KB_STR$
ENDIF
IF GetSymbolValue (CHK_WORK_SPCS$) = _ON$ THEN
SetSymbolValue STR_REQ_WK_SPC$, MakeKb( STR$(VAL(WRKSPC_COST$ ))) + _KB_STR$
ELSE
SetSymbolValue STR_REQ_WK_SPC$, _ZERO_KB_STR$
ENDIF
IF GetSymbolValue (CHK_CLIP_ART$) = _ON$ THEN
SetSymbolValue STR_REQ_CLIP_ART2$, MakeKb (STR$ (GetCostValue (OPT_CLIP_ART))) + _KB_STR$
ELSE
SetSymbolValue STR_REQ_CLIP_ART2$, _ZERO_KB_STR$
ENDIF
RestoreCursor CursorSave%
END SUB
'' MakePath
''
FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
IF szDir$ = "" THEN
szTemp$ = szFile$
ELSEIF szFile$ = "" THEN
szTemp$ = szDir$
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
szTemp$ = szDir$ + szFile$
ELSE
szTemp$ = szDir$ + "\" + szFile$
END IF
if szTemp$ <> "" then
if MID$( szTemp$, LEN( szTemp$ ), 1 ) = "\" then
szTemp$ = MID$( szTemp$, 1, LEN( szTemp$ ) - 1 )
endif
IF MID$(szTemp$, LEN(szTemp$), 1) = ":" THEN
szTemp$ = szTemp$ + "\"
ENDIF
endif
MakePath = szTemp$
END FUNCTION
'' GetFileCosts
''
SUB GetFileCosts STATIC
if fileCostChecked% = 0 then
fileCostChecked% = 1
CursorSave% = ShowWaitCursor ()
SrcDir$ = GetSymbolValue("STF_SRCDIR")
'' get cost of PROGRAM files
ClearCopyList
AddSectionFilesToCopyList "Program Files", SrcDir$, DEST$
AddSectionFilesToCopyList "Setup Files", SrcDir$, WinDir$
if mode% = ADMIN then
AddSectionFilesToCopyList "Setup Files", SrcDir$, WinDir$
endif
i% = GetCopyListCost ( EXTRACOSTS$, COSTLIST$, NEEDLIST$)
PROG_COST$ = GetListItem (COSTLIST$, nWinDrive%)
'' get cost of STANDARD EVENT LISTS
ClearCopyList
AddSectionFilesToCopyList "sel", SrcDir$, WinDir$
i% = GetCopyListCost (EXTRACOSTS$, COSTLIST$, NEEDLIST$)
SEL_COST$ = GetListItem (COSTLIST$, nWinDrive%)
'' get cost of INTERNATIONAL EVENT LISTS
ClearCopyList
AddSectionFilesToCopyList "iel", SrcDir$, WinDir$
i% = GetCopyListCost (EXTRACOSTS$, COSTLIST$, NEEDLIST$)
IEL_COST$ = GetListItem (COSTLIST$, nWinDrive%)
'' get cost of WORKSPACES
ClearCopyList
AddSectionFilesToCopyList "Calendar Files", SrcDir$, WinDir$
i% = GetCopyListCost (EXTRACOSTS$, COSTLIST$, NEEDLIST$)
WRKSPC_COST$ = GetListItem (COSTLIST$, nWinDrive%)
'' get cost of FILTER files
ClearCopyList
AddSectionFilesToCopyList "PowerAlbum Files FILTERS", SrcDir$, WinDir$
i% = GetCopyListCost ( EXTRACOSTS$, COSTLIST$, NEEDLIST$)
FILTERS_COST$ = GetListItem (COSTLIST$, nWinDrive%)
'' get cost of CLIP ART
j% = GetListLength (DIA_ART$)
FOR i% = 1 to j% STEP 1
szChkSym$ = GetListItem (DIA_ART$, i%)
szSection$ = GetListItem (szChkSym$, SECTION)
MakeListFromSectionSize "ALB_COST_LIST", szSection$
jj% = GetListLength ("ALB_COST_LIST")
TheCost& = 0
for ii% = 1 to jj% step 1
TheCost& = TheCost& + VAL (GetListItem ("ALB_COST_LIST", ii%))
next ii%
RemoveSymbol "ALB_COST_LIST"
TheCost& = TheCost& * 26
TheCost& = TheCost& / 20
ReplaceListItem szChkSym$, ITEMCOST, STR$ (TheCost&)
NEXT i%
'' get cost of ALBUMS
j% = GetListLength (DIA_ART$)
FOR i% = 1 to j% STEP 1
szChkSym$ = GetListItem (DIA_ART$, i%)
szSection$ = GetListItem (szChkSym$, ALBUM_SECTION)
MakeListFromSectionSize "ALB_COST_LIST", szSection$
jj% = GetListLength ("ALB_COST_LIST")
TheCost& = 0
for ii% = 1 to jj% step 1
TheCost& = TheCost& + (2 * VAL (GetListItem ("ALB_COST_LIST", ii%)))
next ii%
RemoveSymbol "ALB_COST_LIST"
ReplaceListItem szChkSym$, ALBUM_COST, STR$ (TheCost&)
NEXT i%
TotalSpcFree& = GetTotalSpcFree
RestoreCursor CursorSave%
endif
END SUB
'' AddArtToCopyList
''
SUB AddArtToCopyList STATIC
szSrcDir$ = GetSymbolValue ("STF_SRCDIR")
szDest$ = DEST$
szOptList$ = DIA_ART$
szDest$ = DEST_ART$
IF (GetSymbolValue(RAD_BUILD_ALBUM$) = _ON$) OR (GetSymbolValue(RAD_ART_ONLY$)= _ON$) THEN
j% = GetListLength(DIA_ART$)
FOR i% = 1 to j% STEP 1
szChkSym$ = GetListItem (szOptList$, i%)
szStatus$ = GetListItem (szChkSym, STATUS)
IF szStatus$ = _ON$ THEN
'' cat is checked, add the album
if GetSymbolValue(RAD_BUILD_ALBUM$) = _ON$ then
szSection$ = GetListItem (szChkSym$, ALBUM_SECTION)
AddSectionFilesToCopyList szSection$, szSrcDir$, szDest$
endif
'' and the art
szSection$ = GetListItem (szChkSym$, SECTION)
AddSectionFilesToCopyList szSection$, artSrcPath$, szDest$
ENDIF
NEXT i%
else '' album only
add% = 1
szBigAlb$ = MakePath(szDest$, _BIG_ALB$)
'' does the theme album already exist?
if DoesFileExist(szBigAlb$, femExists) = 1 then
stri$ = "The album, SISWIM2CD.ALB, already exists on your computer from a previous installation. "
stri$ = stri$ + "This album may contain pictures you have added yourself. Do you want to replace it?"
i% = DoMsgBox(stri$ , _SETUP_TITLE$, MB_YESNO+MB_ICONQUESTION)
if i <> IDYES then
add% = 0
endif
endif
if add = 1 then
AddSectionFilesToCopyList "Siswm2cd", szSrcDir$, szDest$
NEED_MERGE = 1
else
NEED_MERGE = 0
endif
ENDIF
END SUB
'' GetCostValue
''
FUNCTION GetCostValue (ftype%) STATIC AS LONG
szSrcDir$ = GetSymbolValue("STF_SRCDIR")
IF ftype% = OPT_CLIP_ART THEN
szOptList$ = DIA_ART$
cost& = ART_LCOST&
ELSE
''i% = DoMsgBox (_ERRMSG_OPTCALC$ + STR$(ftype%), "DEBUG", MB_OK)
ENDIF
'' get number of check boxes in the appropriate dialog
cost& = 0
j% = GetListLength (szOptList$)
FOR i% = 1 to j% STEP 1
szChkSym$ = GetListItem (szOptList$, i%)
szStatus$ = GetListItem (szChkSym$, STATUS)
IF szStatus$ = _ON$ THEN
szCost$ = "0"
IF NOT (GetSymbolValue( RAD_ALBUM_ONLY$ ) = _ON$) THEN
szCost$ = GetListItem (szChkSym$, ITEMCOST)
ENDIF
szCost2$ = "0"
IF ((GetSymbolValue( RAD_ALBUM_ONLY$ ) = _ON$) or (GetSymbolValue( RAD_BUILD_ALBUM$ ) = _ON$)) and (ftype% = OPT_CLIP_ART) THEN
szCost2$ = GetListItem (szChkSym$, ALBUM_COST)
ENDIF
cost& = cost& + VAL (szCost$) + (2 * VAL (szCost2$))
ENDIF
NEXT i%
OUT:
GetCostValue = cost&
END FUNCTION
'' MakeKb
''
FUNCTION MakeKb (szStr$) STATIC AS STRING
i% = MakeKbString (szStr$)
MakeKb = szStr$
END FUNCTION
'' GetTotalSpcFree
''
FUNCTION GetTotalSpcFree STATIC AS LONG
GetTotalSpcFree = GetFreeSpaceForDrive (PROGDRIVE$) + GetFreeSpaceForDrive (ARTDRIVE$) + GetFreeSpaceForDrive (FILTERSDRIVE$)
END FUNCTION
'' OpenWaitMessage
'' uses a modeless dialog to show a non-interactive info msg
''
SUB OpenWaitMessage (AMsg%) STATIC
OldCursor% = ShowWaitCursor()
sz$ = UIStartDlg (CUIDLL$, AMsg%, "FModelessDlgProc", 0, "")
END SUB
'' CloseWaitMessage
''
SUB CloseWaitMessage STATIC
RestoreCursor OldCursor%
UIPop 1
END SUB
'' CheckWin30
''
SUB CheckWin30 STATIC
WinIni$ = MakePath(GetWindowsDir, "WIN.INI")
szTrueTypeEnabled$ = GetIniKeyString (WinIni$, "TrueType", "TTEnable")
if (GetWindowsMajorVersion () = 3) and (GetWindowsMinorVersion () = 0) or (szTrueTypeEnabled$ = "0") then
LOOP_UP:
sz$ = UIStartDlg(CUIDLL$, WARN_WIN30, "FRadioDlgProc", 0, "")
if sz$ = "REACTIVATE" or sz$ = "Option1" or sz$ = "Option2" or sz$ = "Option3" or sz$ = "Option4" or sz$ = "Option5" then
GOTO LOOP_UP
endif
UIPop 1
szResult$ = GetSymbolValue ("FontOption")
if szResult$ = "Option1" then
'' ATM
CreateIniKeyValue ini$, "Aliases", "Roman", "TimesNewRomanPS", cmoNone
CreateIniKeyValue ini$, "Aliases", "Modern", "Arial MT", cmoNone
elseif szResult$ = "Option2" then
'' FaceLift 2.0
CreateIniKeyValue ini$, "Aliases", "Roman", "Dutch801 Rm BT", cmoNone
CreateIniKeyValue ini$, "Aliases", "Modern", "Swis721 BT", cmoNone
elseif szResult$ = "Option3" then
'' FaceLift 1.0
CreateIniKeyValue ini$, "Aliases", "Roman", "Dutch801 BT", cmoNone
CreateIniKeyValue ini$, "Aliases", "Modern", "Swis721 BT", cmoNone
elseif szResult$ = "Option4" then
'' MoreFonts
MfIni$ = MakePath(GetWindowsDir, "MF.INI")
Pre$ = "A"
Changer$ = "A"
Post$ = "001AAA.WNW"
MF_LOOP:
Font$ = GetIniKeyString (MfIni$, "Fonts", Pre$+Changer$+Post$)
if Font$ = "" then
goto OH_WELL
endif
if (INSTR (Font$, "Geneva") > 0 ) AND (INSTR (Font$, "Scal") > 0) then
CreateIniKeyValue ini$, "Aliases", "Roman", "Tiempo (WN/Scal)", cmoNone
CreateIniKeyValue ini$, "Aliases", "Modern","Geneva (WN/Scal)", cmoNone
goto END_MF
elseif (INSTR (Font$, "Geneva") > 0 ) AND (INSTR (Font$, "(WN)") > 0) then
CreateIniKeyValue ini$, "Aliases", "Roman", "Tiempo (WN)", cmoNone
CreateIniKeyValue ini$, "Aliases", "Modern","Geneva (WN)", cmoNone
goto END_MF
else
Changer$ = STR$ (VAL (Changer$) + 1)
goto MF_LOOP
endif
OH_WELL:
CreateIniKeyValue ini$, "Aliases", "Roman", "Tiempo (WN)", cmoNone
CreateIniKeyValue ini$, "Aliases", "Modern","Geneva (WN)", cmoNone
END_MF:
else
OTHER_FONT:
''CreateIniKeyValue ini$, "Aliases", "", "", cmoNone
sz$ = UIStartDlg(CUIDLL$, WARN_OTHER_FM, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO OTHER_FONT
END IF
UIPop 1
endif
'' TrueType is enabled
else
CreateIniKeyValue ini$, "Aliases", "Roman", "Times New Roman", cmoNone
CreateIniKeyValue ini$, "Aliases", "Modern", "Arial", cmoNone
CreateIniKeyValue ini$, "Aliases", "Casque OpenFace", "Casque OpenFace", cmoNone
CreateIniKeyValue ini$, "Aliases", "Formal Script", "Formal Script", cmoNone
CreateIniKeyValue ini$, "Aliases", "Marquee Engraved", "Marquee Engraved", cmoNone
CreateIniKeyValue ini$, "Aliases", "Ultra Shadow", "Ultra Shadow", cmoNone
endif
END SUB
'' DoIniStuff
''
SUB DoIniStuff STATIC
'' open a billboard to notify user that INI file entries are being created
'' [msg text is in the dialog resource file]
OpenWaitMessage (INI_ENTRIES)
WinIniFile$ = MakePath(GetWindowsDir, "WIN.INI")
IF GetSymbolValue(CHK_PROG_FILES$) = _ON$ THEN
'' create WIN.INI entry for POWERUP.INI location
CreateIniKeyValue WinIniFile$, "PowerUp", "PowerUp", UCASE$ (ini$), cmoOverwrite
'' create WIN.INI entries for CCW files (.CCE, .CCI and .CCW)
CreateIniKeyValue WinIniFile$, "Extensions", "cce", UCASE$ ( MakePath( DEST$, "siswim2.exe ^.cce" )), cmoOverwrite
CreateIniKeyValue WinIniFile$, "Extensions", "ccw", UCASE$ ( MakePath( DEST$, "siswim2.exe ^.ccw" )), cmoOverwrite
CreateIniKeyValue WinIniFile$, "Extensions", "cci", UCASE$ ( MakePath( DEST$, "siswim2.exe ^.cci" )), cmoOverwrite
CreateIniKeyValue WinIniFile$, "Extensions", "alb", UCASE$ ( MakePath( DEST$, "palbum.exe ^.alb")), cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Path", UCASE$ (DEST_FILTERS$), cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewPath", UCASE$ (DEST_FILTERS$), cmoOverwrite
'
'' TRANSLATOR START -- *WARNING*: refer to localization guide
'
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter1","All graphics,*.BMP;*.CGM;*.DRW;*.EPI;*.PCX;*.WMF;*.PCD;*.JPG;*.WPG;*.AVI;*.WAV", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter2","Bitmap (*.bmp),*.BMP,IBBMP9,Accusft5.DLL,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter3","CGM (*.cgm),*.CGM,IMCGM9,EMCGM9,METAFILE", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter4","Micrografx (*.drw),*.DRW,IMDRW9,EMDRW9,METAFILE", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter5","Photo CD (*.pcd),*.PCD,IBPCD9,NONE,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter6","Text Effects (*.epi),*.EPI,IBTIF9,Accusft5.DLL,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter7","PC Paint (*.pcx),*.PCX,IBPCX9,Accusft5.DLL,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter8","Windows Metafile (*.wmf),*.WMF,IMWMF9,EMWMF9,METAFILE", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter9","JPEG (*.jpg),*.JPG,Accusft5.DLL,Accusft5.DLL,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter10","WPG (*.wpg),*.WPG,IMWPG9,EMWPG9,METAFILE", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter11","WAV (*.wav),*.WAV,MM____PA.DLL,NONE,AUDIO", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "Filter12","AVI (*.avi),*.AVI,MM____PA.DLL,NONE,VIDEO", cmoOverwrite
'
'' TRANSLATOR END
'
CreateIniKeyValue ini$, _GRAPH_INI$, "FilterDll", "ISGDI9.DLL", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "FilterIni", "ISGDI9.INI", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "TransformFlt", "EMWMF9.FLT", cmoOverwrite
'
'' TRANSLATOR START -- *WARNING*: refer to localization guide
'
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter1","All graphics,*.BMP;*.CGM;*.DRW;*.EPI;*.PCX;*.WMF;*.PCD;*.JPG;*.WPG;*.AVI;*.WAV", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter2","Bitmap (*.bmp),*.BMP,IBBMP9,Accusft5.DLL,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter3","CGM (*.cgm),*.CGM,IMCGM9,EMCGM9,METAFILE", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter4","Micrografx (*.drw),*.DRW,IMDRW9,EMDRW9,METAFILE", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter5","Photo CD (*.pcd),*.PCD,IBPCD9,NONE,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter6","Text Effects (*.epi),*.EPI,IBTIF9,Accusft5.DLL,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter7","PC Paint (*.pcx),*.PCX,IBPCX9,Accusft5.DLL,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter8","Windows Metafile (*.wmf),*.WMF,IMWMF9,EMWMF9,METAFILE", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter9","JPEG (*.jpg),*.JPG,Accusft5.DLL,Accusft5.DLL,BITMAP", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter10","WPG (*.wpg),*.WPG,IMWPG9,EMWPG9,METAFILE", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter11","WAV (*.wav),*.WAV,MM____PA.DLL,NONE,AUDIO", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "NewFilter12","AVI (*.avi),*.AVI,MM____PA.DLL,NONE,VIDEO", cmoOverwrite
'
'' TRANSLATOR END
'
CreateIniKeyValue ini$, _GRAPH_INI$, "FilterDll", "ISGDI9.DLL", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "FilterDll", "ISGDI9.DLL", cmoOverwrite
CreateIniKeyValue ini$, _GRAPH_INI$, "TransformFlt", "EMWMF9.FLT", cmoOverwrite
'' create [calendar whatever] entries
CreateIniKeyValue ini$, _CCW$, "AutoSave", "0", cmoNone
CreateIniKeyValue ini$, _CCW$, "AutoSaveSpan", "15", cmoNone
CreateIniKeyValue ini$, _CCW$, "AutoUpdate", "0", cmoNone
CreateIniKeyValue ini$, _CCW$, "BackgroundMax", "1900", cmoNone
CreateIniKeyValue ini$, _CCW$, "BigPictureBorderMargin", "5", cmoNone
CreateIniKeyValue ini$, _CCW$, "BigPictureDescMargin", "2", cmoNone
CreateIniKeyValue ini$, _CCW$, "ClipboardFormats", "2", cmoNone
CreateIniKeyValue ini$, _CCW$, "ColumnWidthTestString", "NNNNNN", cmoNone
CreateIniKeyValue ini$, _CCW$, "DefaultPriority", "*", cmoNone
CreateIniKeyValue ini$, _CCW$, "DefaultStyle", "Normal", cmoNone
CreateIniKeyValue ini$, _CCW$, "DefaultWorkspacePath", UCASE$ (WinDir$), cmoNone
CreateIniKeyValue ini$, _CCW$, "DisableHyphenation", _NO$, cmoNone
CreateIniKeyValue ini$, _CCW$, "DisplayUpdateDlg", "N", cmoNone
CreateIniKeyValue ini$, _CCW$, "DosGraphicsPath", UCASE$ (WinDir$), cmoNone
CreateIniKeyValue ini$, _CCW$, "EventListPath", UCASE$ (DEST$), cmoNone
CreateIniKeyValue ini$, _CCW$, "EventMarginX", "1", cmoNone
CreateIniKeyValue ini$, _CCW$, "EventMarginY", "1", cmoNone
CreateIniKeyValue ini$, _CCW$, "EXPORT1", """CCPlus DOS 4.0 (.cal)"" CCNV-CAL.DLL *.cal", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "EXPORT2", """CCPlus DOS 5.0 (.cal)"" CCNV-CAL.DLL *.cal", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "EXPORT3", """Comma Delimited (.csv)"" CCNV-CSV.DLL *.csv", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "EXPORT4", """DOS Comma Delimited (.csv)"" CCNV-CSV.DLL *.csv", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "EXPORT5", """Wizard (*.sdf)"" CCNV-WZW.DLL *.sdf", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "FormSizeScale", _YES$, cmoNone
CreateIniKeyValue ini$, _CCW$, "GraphicsPath", UCASE$ (DEST_ART$), cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "HeaderMargin", "5", cmoNone
CreateIniKeyValue ini$, _CCW$, "Hebrew", _YES$, cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "HyphenZone", "30", cmoNone
CreateIniKeyValue ini$, _CCW$, "IMPORT1", """CCPlus DOS (.cal)"" CCNV-CAL.DLL *.cal", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "IMPORT2", """Lotus 1-2-3 (.wks,.wk1)"" CCNV-WKS.DLL *.wks;*.wk1", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "IMPORT3", """dBase III, IV (.dbf)"" CCNV-DBF.DLL *.dbf", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "IMPORT4", """Columnar ASCII (*.*)"" CCNV-COL.DLL *.*", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "IMPORT5", """Comma Delimited (.csv)"" CCNV-CSV.DLL *.csv", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "IMPORT6", """DOS Columnar ASCII (*.*) "" CCNV-COL.DLL *.*", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "IMPORT7", """DOS Comma Delimited (.csv)"" CCNV-CSV.DLL *.csv", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "IMPORT8", """Wizard (sched.wzw,*.sdf)"" CCNV-WZW.DLL sched.wzw;*.sdf", cmOverwrite
CreateIniKeyValue ini$, _CCW$, "ImportExportDelimitor", ",", cmoNone
CreateIniKeyValue ini$, _CCW$, "LastYear", "2000", cmoNone
CreateIniKeyValue ini$, _CCW$, "MarkListsWithNotes", "1", cmoNone
CreateIniKeyValue ini$, _CCW$, "MidPointMargin", "15", cmoNone
CreateIniKeyValue ini$, _CCW$, "MinColumnWidth", "100", cmoNone
CreateIniKeyValue ini$, _CCW$, "MinNoteHeight", "14", cmoNone
CreateIniKeyValue ini$, _CCW$, "MinWordLength", "7", cmoNone
CreateIniKeyValue ini$, _CCW$, "NoteLines", "40", cmoNone
CreateIniKeyValue ini$, _CCW$, "NumberOfExports", "5", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "NumberOfImports", "8", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "PictureBorder", "4", cmoNone
CreateIniKeyValue ini$, _CCW$, "PrintFontsInBlack", _YES$, cmoNone
CreateIniKeyValue ini$, _CCW$, "PrintPreview", "0", cmoNone
CreateIniKeyValue ini$, _CCW$, "ProgramPath", UCASE$ (DEST$), cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "ScreenRes", "0", cmoNone
CreateIniKeyValue ini$, _CCW$, "SecondLineIndentMax", "15", cmoNone
CreateIniKeyValue ini$, _CCW$, "SecondLineIndentPercent", "8", cmoNone
CreateIniKeyValue ini$, _CCW$, "SpecialCaseBanding", _YES$, cmoNone
CreateIniKeyValue ini$, _CCW$, "StyleConflict", "Dialog", cmoNone
CreateIniKeyValue ini$, _CCW$, "StylesPath", UCASE$ (WinDir$), cmoNone
CreateIniKeyValue ini$, _CCW$, "UpdateSpan", "15", cmoNone
CreateIniKeyValue ini$, _CCW$, "UseCommonPalette", "1", cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "WorkspacePath", UCASE$ (DEST$), cmoNone
'' create [paperstock] entries
'' CCW itself creates the stock0 entry if missing, so check for stock1
if GetIniKeyString( ini$, _CPS$, "Stock1" ) = "" then
'' TRANSLATOR START -- *WARNING*: refer to localization guide
CreateIniKeyValue ini$, _CPS$, "Stock0", "Letter - 8.5 x 11;C;P;0.00;0.00;11.00;8.50;1; 1;11.00;8.50;0.75;0.50;0.75;0.50;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock1", "Legal - 8.5 x 14;C;P;0.00;0.00;14.00;8.50;1; 1;14.00;8.50;0.50;0.50;0.75;0.50;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock2", "Wide - 14 x 11;T;P;0.00;0.00;11.00;14.00;1; 1;11.00;14.00;0.50;0.50;0.75;0.50;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock3", "Pocket - 3.75 x 6.75;C;P;0.00;0.00;6.75;3.75;1; 1;6.75;3.75;0.50;0.35;0.63;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock4", "Organizer - 5.5 x 8.5;C;P;0.00;0.00;8.50;5.50;1; 1;8.50;5.50;0.50;0.35;0.63;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock5", "Two/page - 8.5 x 5.5;C;P;0.00;0.00;5.50;8.50;1; 2;11.00;8.50;0.35;0.63;0.35;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock6", "Three/page - 6.75 x 3.66;C;P;0.00;0.00;3.66;6.75;1; 3;11.00;8.50;0.41;0.35;0.35;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock7", "Four/page - 4.25 x 5.5;C;P;0.00;0.00;5.50;4.25;2; 2;11.00;8.50;0.41;0.35;0.41;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock8", "InstaBook - 2/page;C;P;0.00;0.00;5.50;8.50;1; 2;11.00;8.50;0.35;0.63;0.35;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock9", "InstaBook - 4/page;C;P;0.00;0.00;5.50;4.25;2; 2;11.00;8.50;0.35;0.50;0.35;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock10", "InstaBook - 12/page;C;P;0.00;0.00;3.66;2.12;4; 3;11.00;8.50;0.35;0.40;0.35;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock11", "A3 - 29.7 x 42 cm;C;P;0.00;0.00;42.00;29.70;1; 1;42.00;29.70;1.20;1.20;1.60;1.20;M", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock12", "A4 - 21 x 29.7 cm;C;P;0.00;0.00;29.70;21.00;1; 1;29.70;21.00;1.20;1.20;1.60;1.20;M", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock13", "A5 - 14.8 x 21 cm;C;P;0.00;0.00;21.00;14.80;1; 1;21.00;14.80;1.20;1.20;1.60;1.20;M", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock14", "A4 InstaBook - 2/page;C;P;0.00;0.00;14.85;21.00;1; 2;29.70;21.00;0.75;1.00;0.75;0.75;M", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock15", "A4 InstaBook - 4/page;C;P;0.00;0.00;14.85;10.48;2; 2;29.70;21.00;0.75;1.00;0.75;0.75;M", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock16", "A4 InstaBook - 12/page;C;P;0.00;0.00;9.90;5.23;4; 3;29.70;21.00;0.75;1.00;0.75;0.75;M", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock17", "Power Up M0030 - 8.5 x 5.5;C;P;0.00;0.00;5.50;8.50;1; 2;11.00;8.50;0.35;0.35;0.35;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock18", "Power Up M0040 - 2.5 x 4.5;C;P;0.00;0.00;4.50;2.50;3; 2;11.00;8.50;0.35;0.35;0.35;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock19", "Power Up M0401 - 3.75 x 6.75;T;P;0.88;0.00;6.75;3.75;1; 1;8.50;3.75;0.50;0.35;0.56;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock20", "Power Up M0402 - 5.5 x 8.5;T;P;0.00;0.00;8.50;5.50;1; 1;8.50;5.50;0.50;0.35;0.66;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock21", "Power Up M0701 - 3.75 x 6.75;C;P;0.00;0.00;6.75;3.75;2; 1;11.00;8.50;0.50;0.35;0.56;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock22", "Power Up M0702 - 5.5 x 8.5;C;P;0.00;0.00;8.50;5.50;1; 1;11.00;8.50;0.50;0.35;0.66;0.35;I", cmoOverwrite
CreateIniKeyValue ini$, _CPS$, "Stock23", "DiscoverSoft - 5.5 x 8.5;C;P;0.00;1.50;8.50;5.50;1; 1;11.00;8.50;0.50;0.35;0.63;0.35;I", cmoOverwrite
'' TRANSLATOR END
endif
'' create [printing] entries
CreateIniKeyValue ini$, _CCPO$, "Binding", "side", cmoNone
CreateIniKeyValue ini$, _CCPO$, "BlanksAfter", "0", cmoNone
CreateIniKeyValue ini$, _CCPO$, "BlanksBefore", "0", cmoNone
CreateIniKeyValue ini$, _CCPO$, "ColumnOrder", _NO$, cmoNone
CreateIniKeyValue ini$, _CCPO$, "Copies", "1", cmoNone
CreateIniKeyValue ini$, _CCPO$, "Duplex", "Ordered", cmoNone
CreateIniKeyValue ini$, _CCPO$, "FudgeX", "0", cmoNone
CreateIniKeyValue ini$, _CCPO$, "FudgeY", "0", cmoNone
CreateIniKeyValue ini$, _CCPO$, "InputTray", "up", cmoNone
CreateIniKeyValue ini$, _CCPO$, "LandscapeRotate", "left", cmoNone
CreateIniKeyValue ini$, _CCPO$, "ManualFeed", "side", cmoNone
CreateIniKeyValue ini$, _CCPO$, "OutputTray", "down", cmoNone
CreateIniKeyValue ini$, _CCPO$, "OverflowSymbol", _YES$, cmoNone
CreateIniKeyValue ini$, _CCPO$, "PaperHead", "in", cmoNone
CreateIniKeyValue ini$, _CCPO$, "PrintBW", _NO$, cmoNone
CreateIniKeyValue ini$, _CCPO$, "Type", "simplex", cmoNone
CreateIniKeyValue ini$, _CCPO$, "Units", "1", cmoNone
'' create [showpict] & [poweralbum] entries
CreateIniKeyValue ini$,"SHOWPICT","Path",UCASE$ (DEST$),cmoOverwrite
CreateIniKeyValue ini$,"ART","Path",UCASE$ (DEST_ART$),cmoOverwrite
CreateIniKeyValue ini$,"POWERALBUM","Path",UCASE$ (DEST$),cmoOverwrite
CreateIniKeyValue ini$,"POWERALBUM","Import",UCASE$ (DEST_ART$),cmoOverwrite
CreateIniKeyValue ini$,"POWERALBUM","AlternatePicturePath",MakePath (MID$ (sourcDir$, 1, 2), "Art"),cmoOverwrite
CreateIniKeyValue ini$,"SHOWPICT","Path",UCASE$ (DEST$),cmoOverwrite
CreateIniKeyValue ini$,"SHOWPICT","BigTif",_NO$,cmoOverwrite
CreateIniKeyValue ini$,"SHOWPICT","KodakPCDSizes","192,128,384,256,20000,20000,1536,1024,3072,2048",cmoOverwrite
ENDIF
if mode% = ADMIN then
NetworkInf$ = MakePath( DEST$, "CCWNET.INF" )
CreateIniKeyValue NetworkInf$, _CCW$, "ProgramPath", UCASE$ (DEST$), cmoOverwrite
CreateIniKeyValue NetworkInf$, _GRAPH_INI$, "Path", UCASE$ (DEST_FILTERS$), cmoOverwrite
CreateIniKeyValue NetworkInf$, "ART", "Path", UCASE$ (DEST_ART$), cmoOverwrite
endif
CloseWaitMessage
END SUB
'' DoIconStuff
''
SUB DoIconStuff STATIC
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
CreateProgmanGroup _PROG_GRP$, "", cmoNone
ShowProgmanGroup _PROG_GRP$, 1, cmoNone
CreateProgmanItem _PROG_GRP$, _ICON_CCW$, MakePath (DEST$,_EXE_NAME$), "", cmoOverwrite
CreateProgmanItem _PROG_GRP$, _ICON_PA$, MakePath (DEST$,"palbum.exe"), "", cmoOverwrite
CreateProgmanItem _PROG_GRP$, _ICON_README$, MakePath (DEST$,"readme.txt"), "", cmoOverwrite
if mode% = ADMIN then
CreateProgmanItem _PROG_GRP$, _ICON_NETREADME$, MakePath (DEST$,"admin.txt"), "", cmoOverwrite
endif
if mode% <> NODE then
RemoveFile MakePath(DEST$,"album.exe"),cmoNone
RemoveFile MakePath(DEST$,"album.hlp"),cmoNone
RemoveFile MakePath(DEST$,"ccutil.dll"),cmoNone
RemoveFile MakePath(DEST$,"celib.dll"),cmoNone
RemoveFile MakePath(DEST$,"egares.dll"),cmoNone
RemoveFile MakePath(DEST$,"sv2res.dll"),cmoNone
RemoveFile MakePath(DEST$,"svgres.dll"),cmoNone
RemoveFile MakePath(DEST$,"vg2res.dll"),cmoNone
RemoveFile MakePath(DEST$,"vgares.dll"),cmoNone
RemoveFile MakePath(DEST$,"owl.dll"),cmoNone
RemoveFile MakePath(DEST$,"tclass.dll"),cmoNone
SRC$=DEST$
_DUMMYDLL$ = "printer.dll"
'' don't know why this was going on -- brentw
''
''CopyFile MakePath(SRC$,_DUMMYDLL$),MakePath(DEST$,"album2.dll"),cmoNone,0
''CopyFile MakePath(SRC$,_DUMMYDLL$),MakePath(DEST$,"chospict.dll"),cmoNone,0
''CopyFile MakePath(SRC$,_DUMMYDLL$),MakePath(DEST$,"showpict.dll"),cmoNone,0
''CopyFile MakePath(SRC$,_DUMMYDLL$),MakePath(DEST$,"ntbkcan.dll"),cmoNone,0
''CopyFile MakePath(SRC$,_DUMMYDLL$),MakePath(DEST$,"notebook.dll"),cmoNone,0
''CopyFile MakePath(SRC$,_DUMMYDLL$),MakePath(DEST$,"splash.dll"),cmoNone,0
''CopyFile MakePath(SRC$,_DUMMYDLL$),MakePath(DEST$,"cpalette.dll"),cmoNone,0
endif
ENDIF
END SUB
GET_SETUP_MODE:
NetworkInf$ = MakePath( GetSymbolValue("STF_SRCDIR"), "CCWNET.INF" )
if DoesFileExist( NetworkInf$, femExists) <= 0 then
goto KEEP_CHECKING
else
FIND_EXE_PATH:
DEST$ = LCASE$( MakePath( GetSymbolValue( "STF_SRCDIR" ), "" ) )
if DoesFileExist (MakePath (DEST$, _EXE_NAME$), femExists) <= 0 then
i% = DoMsgBox(_ERRMSG_NOFIND$ + MakePath(DEST$, _EXE_NAME$) + _ERRMSG_CONTACT$, _SETUP_TITLE$, MB_OK+MB_TASKMODAL+MB_ICONHAND)
szDelFile$ = MakePath( GetSymbolValue("STF_CWDDIR"), "chklist.ms" )
RemoveFile szDelFile$, cmoNone
END
endif
DEST_FILTERS$ = LCASE$ (GetIniKeyString (NetworkInf$, _GRAPH_INI$, "Path"))
CHECK_FILTERS_PATH:
if DoesFileExist (MakePath (DEST_FILTERS$, "IMWMF9.FLT"), femExists) <= 0 then
''i% = DoMsgBox(_ERRMSG_NOFIND$ + MakePath(DEST_FILTERS$, "IMWMF9.FLT") + _ERRMSG_CONTACT$, "DEBUG", MB_OK+MB_TASKMODAL+MB_ICONHAND)
GET_FILTERS_PATH:
DEST_FILTERS$ = DEST$
SetSymbolValue "EditTextIn", DEST_FILTERS$
SetSymbolValue "EditFocus", "END"
sz$ = UIStartDlg (CUIDLL$, NET_FILTERS_PATH, "FEditDlgProc", 0, "")
IF sz$ = "OK" THEN
szPath$ = MakePath (LCASE$ (GetSymbolValue("EditTextOut")), "")
IF DoesDirExist (szPath$) = 0 THEN
GOSUB BADPATH
GOTO GET_FILTERS_PATH
ENDIF
UIPop 1
DEST_FILTERS$ = szPath$
goto CHECK_FILTERS_PATH
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GET_FILTERS_PATH
ELSE
AskQuit
GOTO GET_FILTERS_PATH
ENDIF
endif
DEST_ART$ = LCASE$ (GetIniKeyString (NetworkInf$, "ART", "Path"))
CHECK_ART_PATH:
if DoesFileExist (MakePath (DEST_ART$, _THEME_ALB$), femExists) <= 0 then
''
GET_ART_PATH:
DEST_ART$ = DEST$
SetSymbolValue "EditTextIn", DEST_ART$
SetSymbolValue "EditFocus", "END"
sz$ = UIStartDlg (CUIDLL$, NET_ART_PATH, "FEditDlgProc", 0, "")
IF sz$ = "OK" THEN
szPath$ = MakePath (LCASE$ (GetSymbolValue("EditTextOut")), "")
IF DoesDirExist (szPath$) = 0 THEN
GOSUB BADPATH
GOTO GET_ART_PATH
ENDIF
UIPop 1
DEST_ART$ = szPath$
goto CHECK_ART_PATH
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GET_ART_PATH
ELSE
AskQuit
GOTO GET_ART_PATH
ENDIF
endif
mode% = NODE
goto DONE_CHECKING
endif
KEEP_CHECKING:
if GetSymbolValue( "STF_MODE" ) = "ADMIN" then
mode% = ADMIN
elseif GetSymbolValue( "STF_MODE" ) = "NETWORK" then
mode% = NORMAL
else
mode% = NORMAL
endif
DONE_CHECKING:
RETURN
DO_NODE_SETUP:
LOOP_NODE1:
sz$ = UIStartDlg(CUIDLL$, NODESETUP, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO LOOP_NODE1
ELSEIF sz$ = "CANCEL" then
AskQuit
goto LOOP_NODE1
ELSE
UIPop 1
ENDIF
InitMainDialogSymbols
goto GET_DATA_PATH
NODE_PATH_DONE:
CreateDir DATA_PATH$, cmoNone
DeleteOldIcons
DoIniStuff
DoIconStuff
'' copy needed files from server
fdest$ = ""
if IsDirWritable( WinSysDir$ ) = 1 then
fdest$ = WinSysDir$
elseif IsDirWritable( WinDir$ ) = 1 then
fdest$ = WinDir$
endif
if fdest$ <> "" then
CopyFile MakePath(DEST$,"CASQUEOF.TTF"),MakePath(fdest$,"CASQUEOF.TTF"),cmoNone,0
CopyFile MakePath(DEST$,"formlscr.TTF"),MakePath(fdest$,"formlscr.TTF"),cmoNone,0
CopyFile MakePath(DEST$,"ultrashd.TTF"),MakePath(fdest$,"ultrashd.TTF"),cmoNone,0
CopyFile MakePath(DEST$,"marqueen.TTF"),MakePath(fdest$,"marqueen.TTF"),cmoNone,0
DoFontStuff
endif
if IsDirWritable( WinDir$ ) = 1 then
szDestFile$ = MakePath( WinDir$, "ccstyles.ccy" )
if DoesFileExist( szDestFile$, femExists) <= 0 then
CopyFile MakePath(DEST$,"ccstyles.ccy"),szDestFile$,cmoNone,0
endif
endif
'' warn 3.0 users they need a font manager
IF GetSymbolValue (CHK_PROG_FILES$) = _ON$ THEN
CheckWin30
ENDIF
GetUserInfo
LOOP_NODE:
sz$ = UIStartDlg(CUIDLL$, EXITSUCCESS, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO LOOP_NODE
ENDIF
UIPop 1
HelpQuit (FrameWindow%)
szDelFile$ = MakePath( GetSymbolValue("STF_CWDDIR"), "chklist.ms" )
RemoveFile szDelFile$, cmoNone
END
'' GetUserInfo
''
SUB GetUserInfo STATIC
'' get the powerup.ini entries if present
szUserName$ = GetIniKeyString (ini$, "USER INFO", "UserName")
szCompany$ = GetIniKeyString (ini$, "USER INFO", "CompanyName")
if (szUserName$ <> "") and (szCompany$ <> "") then
goto END_INFO
endif
if (szUserName$ <> "") and (szCompany$ <> "") then
CreateIniKeyValue ini$, "USER INFO", "UserName", szUserName$, cmoOverwrite
CreateIniKeyValue ini$, "USER INFO", "CompanyName", szCompany$, cmoOverwrite
goto END_INFO
endif
SetSymbolValue NAME_STR$, szUserName$
SetSymbolValue ORG_STR$, szCompany$
GET_USER_INFO_LOOP:
sz$ = UIStartDlg (CUIDLL$, GETINFO, "FNameOrgDlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO GET_USER_INFO_LOOP
ELSEIF sz$ = "OK" THEN
CreateIniKeyValue ini$, "USER INFO", "UserName", GetSymbolValue (NAME_STR$), cmoOverwrite
CreateIniKeyValue ini$, "USER INFO", "CompanyName", GetSymbolValue (ORG_STR$), cmoOverwrite
ENDIF
UIPop 1
END_INFO:
END SUB
GET_DATA_PATH:
DATA_PATH$ = MakePath( RootDir$, _INSTALL_PATH$ )
SetSymbolValue "EditTextIn", DATA_PATH$
SetSymbolValue "EditFocus", "END"
sz$ = UIStartDlg (CUIDLL$, DATAPATH, "FEditDlgProc", 0, "")
IF sz$ = "OK" THEN
szPath$ = MakePath (LCASE$ (GetSymbolValue("EditTextOut")), "")
IF IsDirWritable (szPath$) = 0 THEN
GOSUB BADPATH
GOTO GET_DATA_PATH
END IF
UIPop 1
DATA_PATH$ = szPath$
goto NODE_PATH_DONE
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GET_DATA_PATH
ELSE
AskQuit
GOTO GET_DATA_PATH
ENDIF
SUB SetupIniForMerge STATIC
szPaIni$ = MakePath(GetWindowsDir, _PASETUP_INI$)
szSrcDir$ = GetSymbolValue("STF_SRCDIR")
szDest$ = DEST$
checked% = 0
szOptList$ = DIA_ART$
szDest$ = DEST_ART$
szBlankAlb$ = MakePath(szDest$, _BLANK_ALB$)
'' art and album
if GetSymbolValue(RAD_BUILD_ALBUM$)= _ON$ THEN
j% = GetListLength(DIA_ART$)
for i% = 1 to j% STEP 1
szChkSym$ = GetListItem(szOptList$, i%)
szStatus$ = GetListItem (szChkSym$, STATUS)
IF szStatus$ = _ON$ THEN
'' cat is checked, add the album
checked% = checked% + 1
numstr$ = Str$(checked%)
numstr$ = Ltrim$(numstr$)
szIniSection$ = "Category" + numstr$
szName$ = GetListItem(szChkSym$, ALBUM)
CreateIniKeyValue szPaIni$, szIniSection$, "album", szName$, cmoOverwrite
CreateIniKeyValue szPaIni$, szIniSection$, "install", "1", cmoOverwrite
CreateIniKeyValue szPaIni$, szIniSection$, "dir", szDest$, cmoOverwrite
CreateIniKeyValue szPaIni$, szIniSection$, "artpath", szDest$, cmoOverwrite
CreateIniKeyValue szPaIni$, szIniSection$, "name", "Category" + str$(i), cmoOverwrite
ENDIF
NEXT i%
if checked% > 0 then
szThemeAlb$ = MakePath(szDest$, _THEME_ALB$)
CreateIniKeyValue szPaIni$, "INSTALLINFO", "NbrCategories", numstr$, cmoOverwrite
CreateIniKeyValue ini$, "PowerAlbum", "Merge", "7", cmoOverwrite
CreateIniKeyValue ini$, "PowerAlbum", "Album", szThemeAlb$, cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "Album", szThemeAlb$, cmoOverwrite
if DoesFileExist(szThemeAlb$, femExists) = 1 then
RemoveFile szBlankAlb$, cmoNone
else
RenameFile szBlankAlb$, _THEME_ALB$
endif
endif
'' album only
elseif GetSymbolValue(RAD_ALBUM_ONLY$)= _ON$ THEN
'' what works now
if NEED_MERGE = 1 then
szBigAlb$ = MakePath(szDest$, _BIG_ALB$)
CreateIniKeyValue ini$, "PowerAlbum", "Album", szBigAlb$, cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "Album", szBigAlb$, cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "GraphicsPath", szSrcDir$, cmoOverwrite
CreateIniKeyValue ini$,"POWERALBUM","AlternatePicturePath",MakePath (MID$ (sourcDir$, 1, 2), "Art"),cmoOverwrite
endif
'' art only
else
szThemeAlb$ = MakePath(szDest$, _THEME_ALB$)
if DoesFileExist(szThemeAlb$, femExists) = 1 then
RemoveFile szBlankAlb$, cmoNone
else
RenameFile szBlankAlb$, _THEME_ALB$
szBigAlb$ = MakePath(szDest$, _BIG_ALB$)
if DoesFileExist(szBigAlb$, femExists) = 1 then
CreateIniKeyValue ini$, "PowerAlbum", "Album", szBigAlb$, cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "Album", szBigAlb$, cmoOverwrite
else
CreateIniKeyValue ini$, "PowerAlbum", "Album", szThemeAlb$, cmoOverwrite
CreateIniKeyValue ini$, _CCW$, "Album", szThemeAlb$, cmoOverwrite
endif
endif
endif
END SUB
'' DoFontStuff
''
SUB DoFontStuff STATIC
if IsDirWritable( WinSysDir$ ) = 1 then
adest$ = WinSysDir$
elseif IsDirWritable( WinDir$ ) = 1 then
adest$ = WinDir$
else
goto FontEnd
endif
ret% = InstallTTF(MakePath(TTF_PATH$,"CASQUEOF.TTF"),adest$)
ret% = InstallTTF(MakePath(TTF_PATH$,"formlscr.TTF"),adest$)
ret% = InstallTTF(MakePath(TTF_PATH$,"ultrashd.TTF"),adest$)
ret% = InstallTTF(MakePath(TTF_PATH$,"marqueen.TTF"),adest$)
FontEnd:
END SUB
SUB RunNextInstall STATIC
SrcDir$ = GetSymbolValue("STF_SRCDIR")
ExePath$ = MakePath(SrcDir$, "..\screen\install.exe")
lRet% = WinExec(ExePath$, 1)
END SUB
'$INCLUDE 'init.inc'